<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

/*
 * C_Basic_Product_List
 *
 * 基础物品列表类
 *
 */

class C_Basic_Product_List extends MY_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('Product_Model');
        $this->load->model('System_Model');
    }

    /*
     * index
     * 初始化
     */

    public function index() {
        //获取标题
        $data['title'] = $this->System_Model->get_system('login_title');
        //获取列表,状态为有效
        $data['listView']=$this->Product_Model->GetListForState(OBJ_STATE_VALID);

        $this->load->view('layout/header', $data);
        $this->load->view('layout/menu');
        $this->load->view('basic/basic_product_list_view',$data);
        $this->load->view('layout/footer');
    }
    
    //删除
    function delete($id = FALSE) {
        $data = array(
            'pt_state' => OBJ_STATE_INVALID
        );
        $this->Product_Model->Dele($id,$data);
        redirect('basic/C_Basic_Product_List');
    }
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */